repo: Add OSTREE_REPO_TEST_ERROR=pre-commit env var
authorColin Walters <walters@verbum.org>
Tue, 19 Apr 2016 16:11:01 +0000 (12:11 -0400)
committerColin Walters (automation) <walters+githubbot@verbum.org>
Mon, 2 May 2016 18:44:44 +0000 (18:44 +0000)
commit15b3cab65eb005574f84c9f1df2c8af14bf53129
tree9e636a159cc8a75b1fe1451de58d24f38e0cd1e8
parent3111248373c16a3fd6ecb0566bc6f5f42fd4b54c
repo: Add OSTREE_REPO_TEST_ERROR=pre-commit env var

Setting this causes commit to error out.  There are other ways we
could do this in a more sophisticated fashion, such as via SystemTap
etc.  But this has low-tech applicablity, works as non-root.

The reason I'm adding this is so that we can add test cases for
cleanup of the `tmp/staging-` directory.

Closes: #170
Approved by: jlebon
src/libostree/ostree-repo-commit.c
src/libostree/ostree-repo-private.h
src/libostree/ostree-repo.c
tests/basic-test.sh